//
//  ViewController.m
//  WQTransitionAnimationTool
//
//  Created by Xiang on 2021/5/12.
//

#import "ViewController.h"
#import "TestViewController.h"
#import "WQAnimationTool.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    UIButton *btn = [[UIButton alloc]init];
    [self.view addSubview:btn];
    btn.frame = CGRectMake(0, 0, 80, 28);
    [btn setTitle:@"跳转" forState:UIControlStateNormal];
    btn.backgroundColor = UIColor.redColor;
    [btn setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
    btn.center = self.view.center;
    [btn addTarget:self action:@selector(btnClick) forControlEvents:UIControlEventTouchUpInside];
    
}


- (void)btnClick{
    TestViewController *vc = [[TestViewController alloc]init];
    UINavigationController *navi = [[UINavigationController alloc]initWithRootViewController:vc];
    [WQAnimationTool presentViewControllerWithAnimationType:WQAnimationTypeMoveIn transitionDirection:0 duration:1 fromVC:self toVC:navi completion:^{
    }];
}



@end
